import { IMessageBase } from "../../Framework/MQ/IMessageBase";
import { MessageManager } from "../../Framework/MQ/MessageManager";
import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqRewardHelper } from "./SeqRewardHelper";
type int = number;
//class SActiveNumber
    
    export  class SActiveNumber extends IMessageBase
    {
        constructor(arg1: Boolean=false)
        {
            
            super();if (arg1) 
            {
                MessageManager.instance().regist(this);
            }
            return;
        }

        public /* override */ getType(): int
        {
            return this._type;
        }

        public /* override */ clone(): IMessageBase
        {
            return new SActiveNumber();
        }

        public /* override */ __write(arg1: SerializeStream): void
        {
            arg1.writeInt(this.code);
            arg1.writeString(this.name);
            arg1.writeString(this.context);
            arg1.writeDate(this.startDt);
            arg1.writeDate(this.endDt);
            SeqRewardHelper.write(arg1, this.rewards);
            arg1.writeInt(this.flag);
            arg1.writeString(this.url);
            arg1.writeString(this.icon);
            arg1.writeInt(this.times);
            return;
        }

        public /* override */ __read(arg1: SerializeStream): void
        {
            this.code = arg1.readInt();
            this.name = arg1.readString();
            this.context = arg1.readString();
            this.startDt = arg1.readDate();
            this.endDt = arg1.readDate();
            this.rewards = SeqRewardHelper.read(arg1);
            this.flag = arg1.readInt();
            this.url = arg1.readString();
            this.icon = arg1.readString();
            this.times = arg1.readInt();
            return;
        }

        public /* const */_type: int=20505;

        public /* var */code: int;

        public /* var */name: string;

        public /* var */context: string;

        public /* var */startDt: Date;

        public /* var */endDt: Date;

        public /* var */rewards: Array<any>;

        public /* var */flag: int;

        public /* var */url: string;

        public /* var */icon: string;

        public /* var */times: int;

        public static /* var */_regist: SActiveNumber;
    }

            SActiveNumber._regist = new SActiveNumber(true);
        